<template>
    <div class="c1">
    <van-collapse v-model="activeNames" accordion >
        <van-collapse-item v-for="i in list1" :key="i.id" :title="i.name">
          <p v-for="j in i.son" :key="j.id">
            <router-link :to="{path:j.url}">{{j.name}}</router-link>
          </p >
        </van-collapse-item>
        <!-- <van-collapse-item title="组织用户" name="1">
            <p>组织管理</p>
            <p>用户管理</p>
            <p>职位管理</p>
            <p>岗位管理</p>
        </van-collapse-item>
        <van-collapse-item title="菜单管理" name="2">
            <p>角色管理</p>
            <p>角色授权</p>
            <p>菜单管理</p>
        </van-collapse-item>
        <van-collapse-item title="应用管理" name="3">
            <p>应用开发</p>
            <p>流程监控</p>
            <p>应用模板</p>
            <p>应用市场</p>
        </van-collapse-item> -->
        <!-- {{list1}} -->
        
  </van-collapse>
        
    </div>
</template>

<script>
import maxios from '../http/axios'
export default {
    data() {
        return {
           activeKey:0,
           activeNames:'1',
           list1:[],
        }
    },
    methods: {
        getlist(){
            maxios('getResource','get').then(res => {
                this.list1 = res.list
            })
        },
    },
    created() {
        this.getlist()
    }
}
</script>

<style scoped>
.c1{
    width: 150px;
}
</style>